/**
 * User:
 * Date:2022-10-13
 * Time:19:40
 */
public class JTest {
    public static void main(String[] args) {
        int []arr  =  new int[5];
        for (int i = 0; i < arr.length; i++) {
            int minindex = i;
            for (int j = i+1; j < arr.length; j++) {
                if(arr[j] < arr[minindex]){
                    int tmp = arr[j];
                    arr[j] = arr[minindex];
                    arr[minindex] = tmp;
                    minindex = i;
                }
            }
        }
    }
}
